linux 2.6.18: constify instances of 'struct file_operations'
authorkfraser@localhost.localdomain <kfraser@localhost.localdomain>
Mon, 5 Mar 2007 14:00:05 +0000 (14:00 +0000)
committerkfraser@localhost.localdomain <kfraser@localhost.localdomain>
Mon, 5 Mar 2007 14:00:05 +0000 (14:00 +0000)
Signed-off-by: Jan Beulich <jbeulich@novell.com>
linux-2.6-xen-sparse/drivers/char/mem.c
linux-2.6-xen-sparse/drivers/xen/blktap/blktap.c
linux-2.6-xen-sparse/drivers/xen/char/mem.c
linux-2.6-xen-sparse/drivers/xen/evtchn/evtchn.c
linux-2.6-xen-sparse/drivers/xen/privcmd/privcmd.c
linux-2.6-xen-sparse/drivers/xen/tpmback/tpmback.c
linux-2.6-xen-sparse/drivers/xen/xenbus/xenbus_dev.c
patches/linux-2.6.18/blktap-aio-16_03_06.patch

index 9b7c774ff0bbf9891aa7a6e351ee91cb1adbf22f..4bfcfb84ac93bd874c7752c718de09414e8b4ef3 100644 (file)
@@ -787,7 +787,7 @@ static const struct file_operations mem_fops = {
        .open           = open_mem,
 };
 #else
-extern struct file_operations mem_fops;
+extern const struct file_operations mem_fops;
 #endif
 
 static const struct file_operations kmem_fops = {
index 20b533a3ac338fa85aa12e8ddf8702b5311ec053..586de79f77c7f14c2af16260db000cf56ce41c6c 100644 (file)
@@ -335,7 +335,7 @@ static int blktap_ioctl(struct inode *inode, struct file *filp,
                         unsigned int cmd, unsigned long arg);
 static unsigned int blktap_poll(struct file *file, poll_table *wait);
 
-static struct file_operations blktap_fops = {
+static const struct file_operations blktap_fops = {
        .owner   = THIS_MODULE,
        .poll    = blktap_poll,
        .ioctl   = blktap_ioctl,
index 62951fd7ffbcbeb009eb59f20014d79e35bf36da..4fba735afa6d09726ee3fdafa82e4405fc7b0c1f 100644 (file)
@@ -194,7 +194,7 @@ static int open_mem(struct inode * inode, struct file * filp)
        return capable(CAP_SYS_RAWIO) ? 0 : -EPERM;
 }
 
-struct file_operations mem_fops = {
+const struct file_operations mem_fops = {
        .llseek         = memory_lseek,
        .read           = read_mem,
        .write          = write_mem,
index 4323b58fa847fa5c3d5b7e1fd3f6cb4d51990969..12fea950509cc07d1726a3fb41c6f584f674c5b2 100644 (file)
@@ -406,7 +406,7 @@ static int evtchn_release(struct inode *inode, struct file *filp)
        return 0;
 }
 
-static struct file_operations evtchn_fops = {
+static const struct file_operations evtchn_fops = {
        .owner   = THIS_MODULE,
        .read    = evtchn_read,
        .write   = evtchn_write,
index 947510fa2d7f9ad9d6cb5f364cb1154edfc8d488..46414068c1671a1ad06b2c1b740211c51eb27950 100644 (file)
@@ -248,7 +248,7 @@ static int privcmd_enforce_singleshot_mapping(struct vm_area_struct *vma)
 }
 #endif
 
-static struct file_operations privcmd_file_ops = {
+static const struct file_operations privcmd_file_ops = {
        .ioctl = privcmd_ioctl,
        .mmap  = privcmd_mmap,
 };
index 701a5ad03e38cd948d711e4c4e2fae221e47b15c..662144dddeac3c1dc17079cf67243432b1dc6354 100644 (file)
@@ -629,7 +629,7 @@ static unsigned int vtpm_op_poll(struct file *file,
        return flags;
 }
 
-static struct file_operations vtpm_ops = {
+static const struct file_operations vtpm_ops = {
        .owner = THIS_MODULE,
        .llseek = no_llseek,
        .open = vtpm_op_open,
index a1e56ddb8dd7736e24d1a3c00ec12c8008d84dc8..6a81140af10b58edfb0b7e7e01960761a4749ea2 100644 (file)
@@ -354,7 +354,7 @@ static unsigned int xenbus_dev_poll(struct file *file, poll_table *wait)
        return 0;
 }
 
-static struct file_operations xenbus_dev_file_ops = {
+static const struct file_operations xenbus_dev_file_ops = {
        .read = xenbus_dev_read,
        .write = xenbus_dev_write,
        .open = xenbus_dev_open,
index b0f2a810759f85ee9df5ff0f3dcfca861e79321e..bb2aba6928d46e7cd2eb6749c8bd4ab451fbb8f3 100644 (file)
@@ -106,7 +106,7 @@ diff -pruN ../orig-linux-2.6.18/fs/aio.c ./fs/aio.c
 +      return pollflags;
 +}
 +
-+static struct file_operations aioq_fops = {
++static const struct file_operations aioq_fops = {
 +      .release        = aio_queue_fd_close,
 +      .poll           = aio_queue_fd_poll
 +};
@@ -201,7 +201,7 @@ diff -pruN ../orig-linux-2.6.18/fs/eventpoll.c ./fs/eventpoll.c
                   int maxevents, long timeout);
  static int eventpollfs_delete_dentry(struct dentry *dentry);
 -static struct inode *ep_eventpoll_inode(void);
-+static struct inode *ep_eventpoll_inode(struct file_operations *fops);
++static struct inode *ep_eventpoll_inode(const struct file_operations *fops);
  static int eventpollfs_get_sb(struct file_system_type *fs_type,
                              int flags, const char *dev_name,
                              void *data, struct vfsmount *mnt);
@@ -221,7 +221,7 @@ diff -pruN ../orig-linux-2.6.18/fs/eventpoll.c ./fs/eventpoll.c
 -static int ep_getfd(int *efd, struct inode **einode, struct file **efile,
 -                  struct eventpoll *ep)
 +int ep_getfd(int *efd, struct inode **einode, struct file **efile,
-+                  struct eventpoll *ep, struct file_operations *fops)
++                  struct eventpoll *ep, const struct file_operations *fops)
  {
        struct qstr this;
        char name[32];
@@ -248,7 +248,7 @@ diff -pruN ../orig-linux-2.6.18/fs/eventpoll.c ./fs/eventpoll.c
  
  
 -static struct inode *ep_eventpoll_inode(void)
-+static struct inode *ep_eventpoll_inode(struct file_operations *fops)
++static struct inode *ep_eventpoll_inode(const struct file_operations *fops)
  {
        int error = -ENOMEM;
        struct inode *inode = new_inode(eventpoll_mnt->mnt_sb);
@@ -288,7 +288,7 @@ diff -pruN ../orig-linux-2.6.18/include/linux/eventpoll.h ./include/linux/eventp
 + */
 +struct eventpoll;
 +int ep_getfd(int *efd, struct inode **einode, struct file **efile,
-+             struct eventpoll *ep, struct file_operations *fops);
++             struct eventpoll *ep, const struct file_operations *fops);
  #else
  
  static inline void eventpoll_init_file(struct file *file) {}